package com.lantosec.hmrp.modules.revisit.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.revisit.vo.RevisitConfigVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 回访功能配置 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RevisitConfig extends BaseEntity<RevisitConfigVO> {

    private static final long serialVersionUID = 1L;
    public RevisitConfig(RevisitConfigVO vo){
        this.configId = vo.getConfigId();
        this.callDurationStd = vo.getCallDurationStd();
        this.overDays = vo.getOverDays();
        this.revisitDoctor = vo.getRevisitDoctor();
        this.revisitNurse = vo.getRevisitNurse();
        this.deptId = vo.getDeptId();
    }

    @Override
    public RevisitConfigVO convertToVO(){
        return new RevisitConfigVO(this);
    }


    /**
     * 主键ID
     */
    @TableId(value = "config_id", type = IdType.AUTO)
    private Integer configId;

    /**
     * 规定的最短通话时长(单位：秒)
     */
    private Integer callDurationStd;

    /**
     * 回访期限(单位：天)
     */
    private Integer overDays;

    /**
     * 是否要求医生回访(0否 1是,非强制 2是,强制)
     */
    private Integer revisitDoctor;

    /**
     * 是否要求护士回访(0否 1是,非强制 2是,强制)
     */
    private Integer revisitNurse;

    /**
     * 部门ID
     */
    private String deptId;


    public enum ColName {
        config_id, call_duration_std, over_days, revisit_doctor, revisit_nurse, dept_id, 
    }
}
